package org.ranshiyan.utils;

import org.ranshiyan.service.LockService;

public enum BeanType {

    lockService("lockService", LockService.class);

    private String name;

    private Class nameValue;

    BeanType(String name, Class<LockService> nameValue) {
        this.name = name;
        this.nameValue = nameValue;
    }

    public String getName() {
        return name;
    }

    public Class getNameValue() {
        return nameValue;
    }

    public static Class getType(String name){
        for (BeanType beanType:BeanType.values()) {
            if(name.equals(beanType.getName())){
                return beanType.getNameValue();
            }
        }
        return null;
    }
}
